package cn.huaqingcheng.tool.crypto.digest;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

import java.security.Security;

/**
 * 常见摘要算法
 * 实际就是从 JDK17 {@link Security#getProviders()} 结果中提取的
 */
@Getter
@RequiredArgsConstructor
public enum DigestAlgorithm {
    MD2("MD2"),
    MD5("MD5"),

    SHA3_224("SHA3-224"),
    SHA3_256("SHA3-256"),
    SHA3_384("SHA3-384"),
    SHA3_512("SHA3-512"),

    SHA_1("SHA-1"),

    SHA_224("SHA-224"),
    SHA_256("SHA-256"),
    SHA_384("SHA-384"),
    SHA_512("SHA-512"),
    SHA_512_224("SHA-512/224"),
    SHA_512_256("SHA-512/256"),
    ;

    private final String algorithm;
}
